package com.tjsinfo.tjsoa.workplan.bo;


import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

//import javax.servlet.http.HttpServletRequest;
//import com.tjsinfo.tjsoa.common.DateTimeFromConver;

import com.tjsinfo.tjsoa.workplan.vo.WorkPlanMain;;

public interface IWorkPlanMainBo {
	public String save(Integer userid,Date datetime,String type,String content,String complete_countent,Integer year,Integer number,Integer start,Integer submittype);
	public void delete(String id);
	public void update(String id, Integer userid,Date datetime,String type,String content,String complete_countent,Integer year,Integer number,Integer start);
	/**
	 * 根据用户ID时间类型查询工作计划
	 * @param 用户
	 * @param 时间
	 * @param 类型
	 * @return
	 */
	public WorkPlanMain selectTypeAndUserAndDate(Integer userid, Date date,
			String type);
	/**
	 * 基于主键查询
	 * @param id
	 * @return
	 */
	public WorkPlanMain selectByID(String id);
	/**
	 * 查询工作计划并且带批示
	 * @param jihuaid
	 * @return
	 */
	public WorkPlanMain selectWorkPlanMainAndExamine(String jihuaid);
	/**
	 * 添加工作计划完成情况
	 * @param value
	 * @return
	 */
	public boolean addWorkPlanMainCompleteContent(String value,String id);
	/**
	 * 根据年份和类型查询
	 * @param 类型
	 * @param 年
	 * @return
	 */
	public List selectWorkPlanTypeAndYear(String type, Integer year,Integer userid);
	/**
	 * 根据年份和类型查询
	 * @param 类型
	 * @param 年
	 * @return map
	 */
	public Map<Date, WorkPlanMain> selectWorkPlanTypeAndYearMAP(String type, Integer year,Integer userid);
	/**
	 * 根据年份和类型查询
	 * @param 类型
	 * @param 年
	 * @return map<"number","workplan">
	 */
	public Map<Integer, WorkPlanMain> selectWorkPlanTypeAndYearMAPNumber(String type, Integer year,
			Integer userid);
	/**
	 * 根据年份和类型查询
	 * @param 类型
	 * @param 年
	 * @param 状态
	 * @return map<"number","workplan">
	 */
	public Map<Date, WorkPlanMain> selectWorkPlanTypeAndYearMAPTimeStart(String type, Integer year,
			Integer userid,Integer start);
	/**
	 * 查询状态类型和年份
	 */
	public Map<Integer, WorkPlanMain> selectWorkPlanTypeAndYearMAPNumberStart(String type,
			Integer year, Integer userid, Integer start);
	
	public List selectTypeAndUser(String type,Integer id);
	
	/**
	 * 根据用户ID和类型
	 * @param userid
	 * @param Type
	 * @return
	 */
	//public List selectUserAndTyp(Integer userid,String Type);
	/**
	 * 查询用户和时间
	 * @param 时间字符串
	 * @param 用户ID
	 * @return
	 */
	public WorkPlanMain selectDateAndUser(String datestr, Integer userid);
	/**
	 * 检查默认工作计划
	 */
	public Map<Date, WorkPlanMain> checkDefinntWorkPlan(String type, Integer year, Integer userid, Integer start);
	
	/**
	 * 工作计划模糊查询
	 * @param 用户ID
	 * @param 内容关键字
	 * @return
	 */
	public List selectLike(Integer userid,String content);
	/**
	 * 工作计划类型模糊查询
	 * @param 用户ID
	 * @param 内容
	 * @param 类型
	 * @return
	 */
	public List selectLikeType(Integer userid,String content,String type);
	
	public void selectMapWorkPlanMain(HttpServletRequest request);
	
}
